package com.tianquan.spi;/**
 * @author starsea
 * @date 2024-09-15 下午7:23
 */

import com.tianquan.spi.clazz.UserService;

import java.util.ServiceLoader;

/**
 *@BelongsProject: uploaddemo
 *@BelongsPackage: com.tianquan.spi
 *@Author: tianquan
 *@CreateTime: 2024-09-15  19:23
 *@Description: 测试
 *@Version: 1.0
 */

public class Jdk {

    public static void main(String[] args) {
        ServiceLoader<UserService> serviceLoader = ServiceLoader.load(UserService.class);
        for (UserService helloService : serviceLoader) {
            System.out.println(helloService.getName());
        }
    }
}
